package com.knowledge.plus.自定义注解.example1.aspect;

import com.knowledge.plus.自定义注解.example1.annotation.MyMethod;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author aFei
 * @since 2022/11/20
 */
@Aspect
@Component
public class MyMethodAspect {

    @Before("@annotation(myMethodData)")
    public void doBefore(JoinPoint point, MyMethod myMethodData) throws Throwable {
        System.out.println(myMethodData.value());
    }


}
